<?php

namespace ctrl;

use model\log_sql;
use libs\view;

class log extends base
{

	private static $M;
	public static function Init()
	{
		parent::init();
		self::$M = new log_sql;
	}
	public static function index()
	{
		if (isset($_GET['list_json'])) {
			jsonList(self::$M->jsonPageSelect());
		} else {
			view::display();
		}
	}

	public static function clear()
	{
		$result = self::$M->clearData();
		Response(array('status' => $result['status'], 'info' => $result['msg']));
	}
}
